home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_pru_test2.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
68 lines
# Jones 3D Cog Script
#
# PRU_test2.cog ThingLightAnim test.
#
# [GGJ]
#
# (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ========================================================================================
symbols
message activated
message startup
thing torch //the thing you light
thing flame nolink //flame, hidden at startup
thing dynalite //dynamic light (to control where light is cast)
thing otherthing //item that gets highlighted
sound burning=gen_torch_burnin_c.wav local
vector minlite local
vector maxlite local
flex minradius=0.3 local
flex maxradius=0.3 local
flex reach=0 //0 for medium, 1 for high
flex islit=0 local //set to 1 if torch lights at startup
flex flicker=1 //set to 0 to eliminate flicker
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
minlite = VectorSet(0.87, 0.55, 0.06);
maxlite = VectorSet(0.89, 0.64, 0.30);
SetThingFlags(flame, 0x10);
SetThingLight(torch, VectorSet(0.0, 0.0, 0.0), 0.3, 0.1);
return;
# ........................................................................................
activated:
if (islit) return;
if ((GetCurWeapon(player) != 13) && (!InEditor())) return;
PlayMode(player, (60 + reach), 0);
Sleep(0.5); //no return, falls through to lightit
ClearThingFlags(flame, 0x10);
SetThingLight(torch, minlite, 0.3, 0.5);
SetThingLight(dynalite, minlite, 0.3, 0.5);
if (otherthing)
{
SetThingLight(otherthing, minlite, 0.01, 0.5);
}
Sleep(0.5);
PlaySoundThing(burning, torch, 1, 3, 10, 1);
islit = 1;
if (flicker == 0) return;
ThingLightAnim(torch, minlite, minradius, maxlite, maxradius, 2);
return;
end